headerbar: Remove unneeded checks
authorBenjamin Otte <otte@redhat.com>
Wed, 30 Apr 2014 07:17:07 +0000 (09:17 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 1 May 2014 12:51:28 +0000 (14:51 +0200)
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.

gtk/gtkheaderbar.c

index 05dfc8f6af1ce102bed67c4a3cd4972518a3db86..c180925a6c9c298ffcffb416e784539ae218e8fa 100644 (file)
@@ -661,11 +661,8 @@ gtk_header_bar_get_size (GtkWidget      *widget,
       natural = MAX (center_nat, natural + css_borders.top + css_borders.bottom);
     }
 
-  if (minimum_size)
-    *minimum_size = minimum;
-
-  if (natural_size)
-    *natural_size = natural;
+  *minimum_size = minimum;
+  *natural_size = natural;
 }
 
 static void
@@ -748,11 +745,8 @@ gtk_header_bar_compute_size_for_orientation (GtkWidget *widget,
   required_size += css_borders.left + css_borders.right;
   required_natural += css_borders.left + css_borders.right;
 
-  if (minimum_size)
-    *minimum_size = required_size;
-
-  if (natural_size)
-    *natural_size = required_natural;
+  *minimum_size = required_size;
+  *natural_size = required_natural;
 }
 
 static void
@@ -875,11 +869,8 @@ gtk_header_bar_compute_size_for_opposing_orientation (GtkWidget *widget,
   computed_minimum = MAX (center_min, computed_minimum + css_borders.top + css_borders.bottom);
   computed_natural = MAX (center_nat, computed_natural + css_borders.top + css_borders.bottom);
 
-  if (minimum_size)
-    *minimum_size = computed_minimum;
-
-  if (natural_size)
-    *natural_size = computed_natural;
+  *minimum_size = computed_minimum;
+  *natural_size = computed_natural;
 }
 
 static void